using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 计算器控制台
{
    class Program
    {
        public static void Main()
        {
            Console.WriteLine("请输入第一个数字");
            double num1 = double.Parse(Console.ReadLine());
            Console.WriteLine("请输入第二个数字");
            double num2 = double.Parse(Console.ReadLine());
            Console.WriteLine("请输入需要进行的计算");
            char op = (char)Console.Read();


            double result;
            switch (op)
            {
                case '+':
                    result = num1 + num2;
                    Console.WriteLine(num1 + "+" + num2 + "=" + result);
                    break;
                case '-':
                    result = num1 - num2;
                    Console.WriteLine(num1 + "-" + num2 + "=" + result);
                    break;
                case '*':
                    result = num1 * num2;
                    Console.WriteLine(num1 + "*" + num2 + "=" + result);
                    break;
                case '/':
                    result = num1 * num2;
                    Console.WriteLine(num1 + "/" + num2 + "=" + result);
                    break;
                default:
                    Console.WriteLine("输入有误");
                    break;
            }

        }

    }
}
